import request from '@/utils/request'

export function pageCategories(query) {
  return request({
    url: '/vendor/category/list',
    method: 'get',
    params: query
  })
}

export function listAllCategories(query) {
  return request({
    url: '/vendor/category/listAll',
    method: 'get',
    params: query
  })
}

export function delCategory(data) {
  return request({
    url: '/vendor/category/delete',
    method: 'post',
    data
  })
}

export function publishCategory(data) {
  return request({
    url: '/vendor/category/create',
    method: 'post',
    data
  })
}

export function detailCategory(id) {
  return request({
    url: '/vendor/category/read',
    method: 'get',
    params: { id }
  })
}

export function editCategory(data) {
  return request({
    url: '/vendor/category/update',
    method: 'post',
    data
  })
}

